﻿@model BBSSite.Areas.Admins.ViewModels.AddRoleEntity
@{
    ViewBag.Title = "创建角色";
    MyPublic.IGettingUrl Urls = ViewBag.Urls as MyPublic.IGettingUrl;
}@section link{
    <link rel="stylesheet" href="@Urls.ContentCssUrl/admins/Public.css" />
}
@using (Html.BeginForm("DoCreateRole", "Users", FormMethod.Post))
{
    @Html.AntiForgeryToken()
    <div class="container toppx1">
        <div class="row">
            <div class="col-md-3"></div>
            <div class="col-md-6">
                <div class="input-group">
                    <span class="input-group-addon">角色名称</span>
                    @Html.EditorFor(model => model.RoleName, new { htmlAttributes = new { @class = "form-control" } })
                    <span class="input-group-addon mymsg">@Html.ValidationMessageFor(model => model.RoleName)</span>
                </div>
            </div>
            <div class="col-md-3"></div>
        </div>
        <br />
        选择栏目
        <hr />
        <div class="row">
            <div class="col-md-3"></div>
            <div class="col-md-6">
                <div class="input-group">
                    @{
                        IList<BBSSite.Models.tb_Column> Columns = ViewBag.Columns;
                        foreach (var Column in Columns)
                        {
                            if (Column.ColumnCode.Length == 1)
                            {
                                <div><label style="font-size:15px;"><input type="checkbox" value="@Column.ID" name="Column" OneColumnCode="@Column.ColumnCode" onclick="AllChoose(this,'@Column.ColumnCode')"/> @Column.ColumnName&nbsp;</label></div>
                            }
                            else
                            {
                                @:&nbsp;&nbsp;&nbsp;&nbsp;<label style="font-size:13px;color:#808080"><input type="checkbox" ColumnCode="@Column.ColumnCode.Substring(0,1)" value="@Column.ID" name="Column" onclick="Choose(this)"/> @Column.ColumnName&nbsp;</label>
                            }
                        }
                    }
                </div>
            </div>
            <div class="col-md-3"></div>
        </div>
        <br />
        <div class="row">
            <div class="col-md-12 text-center">
                <input type="submit" name="sublogin" class="OnLogin" value="创建" />
                &nbsp;@Html.ValidationMessage("RoleError", new { style = "color:Red" })
            </div>
        </div>
    </div>
}
<script type="text/javascript" src="@Urls.ContentJSUrl/Role.js"></script>
